package com.example.shortlink.common.database;

import com.mybatisflex.annotation.Column;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseEntity {

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private Date createTime;

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date updateTime;

    /**
     * 删除标识 0：未删除 1：已删除
     */
    @Column(onInsertValue = "0")
    private Boolean delFlag;
}
